﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Windows.Forms;
using System.Drawing;

namespace WOWMultiPlay
{
    public static class Helper_Thread
    {
        delegate void SetButtonForeColorCallback(Button btn, Color color);

        public static void SetButtonForeColor(Button btn, Color color)
        {
            if (btn.InvokeRequired)
            {
                SetButtonForeColorCallback D = new SetButtonForeColorCallback(SetButtonForeColor);
                try
                {
                    btn.Invoke(D, new object[] { btn, color });
                }
                catch { }
            }
            else
            {
                btn.ForeColor = color;
            }
        }
    }
}
